<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Detailed semantics</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="../../../index.html" title="Boost.Optional">
<link rel="up" href="../io_header.html" title="Header &lt;boost/optional/optional_io.hpp&gt;">
<link rel="prev" href="../io_header.html" title="Header &lt;boost/optional/optional_io.hpp&gt;">
<link rel="next" href="../header__boost_optional_optional_fwd_hpp_.html" title="Header &lt;boost/optional/optional_fwd.hpp&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../io_header.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_header.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../header__boost_optional_optional_fwd_hpp_.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_optional.reference.io_header.io_semantics"></a><a class="link" href="io_semantics.html" title="Detailed semantics">Detailed
        semantics</a>
</h4></div></div></div>
<p>
          <a name="reference_operator_ostream"></a><code class="computeroutput"><span class="keyword">template</span>
          <span class="special">&lt;</span><span class="keyword">class</span>
          <span class="identifier">CharType</span><span class="special">,</span>
          <span class="keyword">class</span> <span class="identifier">CharTrait</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span></code>
          <br>     <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">&gt;&amp;</span></code> <br>     <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;&lt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">&gt;&amp;</span>
          <span class="identifier">out</span><span class="special">,</span>
          <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">);</span></code>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              <span class="bold"><strong>Effect:</strong></span> Outputs an implementation-defined
              string. The output contains the information about whether the optional
              object contains a value or not. If <code class="computeroutput"><span class="identifier">v</span></code>
              contains a value, the output contains result of calling <code class="computeroutput"><span class="identifier">out</span> <span class="special">&lt;&lt;</span>
              <span class="special">*</span><span class="identifier">v</span></code>.
            </li>
<li class="listitem">
              <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="identifier">out</span></code>.
            </li>
</ul></div>
<p>
          <span class="inlinemediaobject"><img src="../../../images/space.png" alt="space"></span> <a name="reference_operator_ostream_none"></a>
        </p>
<p>
          <code class="computeroutput"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">CharType</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">CharTrait</span><span class="special">,</span>
          <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span></code> <br>     <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">&gt;&amp;</span></code>
          <br>     <code class="computeroutput"><span class="keyword">operator</span><span class="special">&lt;&lt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">&gt;&amp;</span> <span class="identifier">out</span><span class="special">,</span> <span class="identifier">none_t</span><span class="special">);</span></code>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              <span class="bold"><strong>Effect:</strong></span> Outputs an implementation-defined
              string.
            </li>
<li class="listitem">
              <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="identifier">out</span></code>.
            </li>
</ul></div>
<p>
          <span class="inlinemediaobject"><img src="../../../images/space.png" alt="space"></span> <a name="reference_operator_istream"></a>
        </p>
<p>
          <code class="computeroutput"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">CharType</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">CharTrait</span><span class="special">,</span>
          <span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span></code> <br>     <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">&gt;&amp;</span></code>
          <br>     <code class="computeroutput"><span class="keyword">operator</span><span class="special">&gt;&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span><span class="identifier">CharType</span><span class="special">,</span> <span class="identifier">CharTrait</span><span class="special">&gt;&amp;</span> <span class="identifier">in</span><span class="special">,</span> <span class="identifier">optional</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;&amp;</span> <span class="identifier">v</span><span class="special">);</span></code>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
              <span class="bold"><strong>Requires:</strong></span> <code class="computeroutput"><span class="identifier">T</span></code>
              is <a href="http://www.sgi.com/tech/stl/DefaultConstructible.html" target="_top"><code class="computeroutput"><span class="identifier">DefaultConstructible</span></code></a> and
              <code class="computeroutput"><span class="identifier">MoveConstructible</span></code>.
            </li>
<li class="listitem">
              <span class="bold"><strong>Effect:</strong></span> Reads the value of optional
              object from <code class="computeroutput"><span class="identifier">in</span></code>. If
              the string representation indicates that the optional object should
              contain a value, <code class="computeroutput"><span class="identifier">v</span></code>
              contains a value and its contained value is obtained as if by default-constructing
              an object <code class="computeroutput"><span class="identifier">o</span></code> of type
              <code class="computeroutput"><span class="identifier">T</span></code> and then calling
              <code class="computeroutput"><span class="identifier">in</span> <span class="special">&gt;&gt;</span>
              <span class="identifier">o</span></code>; otherwise <code class="computeroutput"><span class="identifier">v</span></code> does not contain a value, and the
              previously contained value (if any) has been destroyed.
            </li>
<li class="listitem">
              <span class="bold"><strong>Returns:</strong></span> <code class="computeroutput"><span class="identifier">out</span></code>.
            </li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2007 Fernando Luis Cacciola Carballal<br>Copyright © 2014-2021 Andrzej Krzemieński<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../io_header.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../io_header.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../header__boost_optional_optional_fwd_hpp_.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
